<!DOCTYPE html>
<!--
     SPDX-License-Identifier: CC-BY-SA-4.0
     SPDX-FileCopyrightText: 2020 seL4 Project a Series of LF Projects, LLC.
-->
<!-- Page last generated 2025-02-20 03:16:15 +0000 -->
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Jetson TK1 | seL4 docs</title>

    <!-- Our stylesheet and theme stylesheet.  Contains bootstrap. -->
    <link rel="stylesheet" href="/assets/css/style.css" type="text/css">
    <!-- Font awesome -->
    <link href="https://use.fontawesome.com/releases/v5.0.8/css/all.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
    <!-- Pygments syntax highlighting  -->
    <link rel="stylesheet" href="/assets/css/highlighting/trac.css" type="text/css">
    <link rel="icon" type="image/x-icon" href="/assets/favicon.ico"><script defer data-domain="docs.sel4.systems"
	    src="https://analytics.sel4.systems/js/script.js"></script></head>

  <body class="container-fluid">

    



<header>
  <ul class="row menu">
    <li class="col-xs-12 col-md-2" >
            <a href="https://sel4.systems" class="skip-icon">
              <img class="img-responsive" src="/assets/logo-text-white.svg" alt="seL4 logo" />
            </a>
    </li>
    <li class="col-xs-12 col-md-10 menu">
      <nav aria-label="Banner links">
        <h2><a href="/Resources" />Resources</h2>
        <h2><a href="/processes" />Contributing</a></h2>
        <h2><a href="/projects" />Projects</h2>
        <h2><a href="/Tutorials" />Tutorials</h2>
        <iframe title="DuckDuckGo search bar" src="https://duckduckgo.com/search.html?site=docs.sel4.systems&prefill=Search%20sel4.systems" style="overflow:hidden;margin-bottom:10px; padding:0;height:40px;float:right;border-width: 0px"></iframe>
      </nav>
    </li>
  </ul>
  <div class="clear"></div>
  
<div class="breadcrumbs bootstrap hidden-sm-down">
  <nav class="sel-breadcrumb" aria-label="Breadcrumb" >
    <ol class=" list-unstyled" vocab="http://schema.org/" typeof="BreadcrumbList">
      
      
        

        

        <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <a property="item" typeof="WebPage" href="/">
              <span property="name"><b>seL4 Docs</b></span>
            </a>
            <meta property="position" content="1" />
        </li>
      
        

        

        <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <a property="item" typeof="WebPage" href="/Hardware/">
              <span property="name"><b>Supported platforms</b></span>
            </a>
            <meta property="position" content="2" />
        </li>
      
        

        
          <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <span property="name">Jetson TK1</span>
            <meta property="position" content="3" /></li>
          
    </ol>
  </nav>
  <nav class="sel-version" aria-label="Current Versions">
    <ol class="list-unstyled">
      <li class="list-unstyled text-right" style="margin-left:auto; padding:0rem 0rem;">
        Current versions:</li>
      <li class="list-unstyled text-right">
      <a href="/releases/sel4/13.0.0"><b>seL4-13.0.0</b></a></li>
      <li class="list-unstyled text-right">
      <a href="/releases/microkit/1.4.1"><b>microkit-1.4.1</b></a></li>
      <li class="list-unstyled text-right">
      <a href="/releases/camkes/camkes-3.11.0"><b>camkes-3.11.0</b></a></li>
      <li class="list-unstyled text-right">
      <a href="/releases/capdl/0.3.0"><b>capDL-0.3.0</b></a></li>
      </ol>
  </nav>
  <div class='clear'></div>
</div>


</header>

    <main>
      <div class="row">
  <div class="hidden-xs col-sm-4 col-md-3 col-lg-2">
    


<div class="sidebar">
















</div>

  </div>
  <div class="col-sm-8 col-md-9 col-lg-8 main">
    
      <nav aria-label="Table of Contents">
        <ul id="toc" class="section-nav">
<li class="toc-entry toc-h3"><a href="#pre-requisites">Pre-Requisites</a></li>
<li class="toc-entry toc-h2"><a href="#getting-started">Getting Started</a></li>
<li class="toc-entry toc-h2"><a href="#build-your-first-sel4-system">Build your first seL4 system</a></li>
<li class="toc-entry toc-h2"><a href="#load-the-binary">Load the binary</a></li>
<li class="toc-entry toc-h2"><a href="#flash-u-boot">Flash U-Boot</a></li>
<li class="toc-entry toc-h2"><a href="#getting-the-sources">Getting the sources</a></li>
<li class="toc-entry toc-h2"><a href="#building">Building</a></li>
<li class="toc-entry toc-h2"><a href="#flashing">Flashing</a></li>
<li class="toc-entry toc-h2"><a href="#running-linux-with-the-new-u-boot">Running Linux with the new U-Boot</a></li>
</ul>
      </nav>
    
    <div class="content">
      <h1 id="jetson-tk1">Jetson TK1</h1>

<p>The <a href="http://www.nvidia.com/object/jetson-tk1-embedded-dev-kit.html">Jetson TK1</a> is a affordable embedded system developed by NVIDIA. It runs
seL4. We will explain how to run seL4 on the Tegra.</p>

<h3 id="pre-requisites">Pre-Requisites</h3>
<ul>
  <li>One Tegra Board. See <a href="http://www.nvidia.com/object/jetson-tk1-embedded-dev-kit.html">Jetson TK1</a></li>
  <li>The development environment fully working.  See <a href="/Resources">Resources</a></li>
</ul>

<h2 id="getting-started">Getting Started</h2>
<p>To get started, check out the
<a href="https://developer.nvidia.com/embedded-computing">NVIDIA developer
page</a>, make sure your board is correctly configured and plugged.</p>

<h2 id="build-your-first-sel4-system">Build your first seL4 system</h2>

<p>Checkout the sel4test project using repo as per <a href="/seL4Test">seL4Test</a></p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>repo init <span class="nt">-u</span> https://github.com/seL4/sel4test-manifest.git
repo <span class="nb">sync
mkdir </span>cbuild
<span class="nb">cd </span>cbuild
../init-build.sh <span class="nt">-DPLATFORM</span><span class="o">=</span>tk1 <span class="nt">-DAARCH32</span><span class="o">=</span>1
<span class="c"># The default cmake wrapper sets up a default configuration for the target platform.</span>
<span class="c"># To change individual settings, run `ccmake` and change the configuration</span>
<span class="c"># parameters to suit your needs.</span>
ninja

</code></pre></div></div>

<p>Generated binaries can be found in the <code class="language-plaintext highlighter-rouge">images/</code> directory.</p>

<h2 id="load-the-binary">Load the binary</h2>
<p>You need to be able to see output from the serial
console on the Tegra. Connect the serial port to your computer with a
serial cable, either a USB-&gt;RS232 converter, or if your computer has
a serial port, connect to it.</p>

<p>Once you have the wires in place, you can connect to the console via
<code class="language-plaintext highlighter-rouge">screen</code> (or you can use minicom or another serial console program). In
the following, we assume that the Tegra is connected to <code class="language-plaintext highlighter-rouge">/dev/ttyUSB0</code>.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>screen /dev/ttyUSB0 115200
</code></pre></div></div>

<p>When you start the board, you will see the U-Boot prompt. To load the
binary you need to interact with U-Boot. I personally use a DHCP/TFTP
server to get the binary onto the board. Copy <code class="language-plaintext highlighter-rouge">sel4.img</code> onto the tftp
server; if you’ve set up DHCP properly it will pass the server IP to the
board. Otherwise you can specify the IOP address on the command. The
following command will then scan the PCI bus and enable the ethernet,
and then ask to get an address via the DHCP and get <code class="language-plaintext highlighter-rouge">sel4.img</code> file from
the TFTP server at <code class="language-plaintext highlighter-rouge">192.168.1.1</code>.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pci enum dhcp ${loadaddr} 192.168.1.1:sel4.img
</code></pre></div></div>

<p>Then, let’s start the program.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>bootefi ${loadaddr}
</code></pre></div></div>

<h2 id="flash-u-boot">Flash U-Boot</h2>

<p>Warning: This flashing procedure is for the Jetson TK1 by NVIDIA. There
is another TK1 board called the TK1-SOM by Colorado Engineering which
requires a different flashing procedure. Please be sure you’re following
these instructions if you are truly trying to flash a <strong>Jetson</strong> and
not the <strong>TK1-SOM</strong>. If you are trying to flash a TK1-SOM, please
<a href="CEI_TK1_SOM#u-boot">use the procedure described here instead</a>.</p>

<p>The initial version of U-Boot does not provides all necessary
functionality. In particular, it boots the system in secure mode. To run
a virtual machine monitor, the Tegra needs to be booted in nonsecure or
HYP mode. After installing a new u-boot (instructions below) you can
boot in either secure on non-secure mode based on a u-boot environment
variable.</p>

<p>Do</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>setenv bootm_boot_mode nonsec
saveenv
</code></pre></div></div>
<p>to boot in nonsecure (HYP)
mode. This also enables kvm if you boot Linux.</p>

<p>To go back to secure mode booting do</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>setenv bootm_boot_mode sec
saveenv
</code></pre></div></div>
<h2 id="getting-the-sources">Getting the sources</h2>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">mkdir </span>tegra-u-boot-flasher
<span class="nb">cd </span>tegra-u-boot-flasher
repo init <span class="nt">-u</span> https://github.com/NVIDIA/tegra-uboot-flasher-manifests.git
repo <span class="nb">sync</span>
</code></pre></div></div>

<h2 id="building">Building</h2>
<p>To build the sources, build the necessary tools first.</p>

<p>Install autoconf, pkg-config, flex, bison, libcrypto++-dev and
libusb-1.0.0-dev for your distribution. On Debian or Ubuntu you can do:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get update
sudo apt-get install build-essential autoconf pkg-config flex bison libcrypto++-dev libusb-1.0.0-dev gcc-arm-linux-gnueabi
</code></pre></div></div>

<p>Then do:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">cd </span>scripts
./build-tools build
</code></pre></div></div>

<p>Then, in the script directory, build everything.</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>./build <span class="nt">--socs</span> tegra124 <span class="nt">--boards</span> jetson-tk1 build
</code></pre></div></div>

<h2 id="flashing">Flashing</h2>
<p>To flash, attach the Jetson board’s OTG USB port to a USB
port on your machine. Hold down the FORCE RECOVERY button while pressing
the RESET button next to it; release FORCE RECOVERY a second or two
after releasing the reset button</p>

<p>Then issue:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>./tegra-uboot-flasher flash jetson-tk1
</code></pre></div></div>

<p>The board should now be updated.</p>

<h2 id="running-linux-with-the-new-u-boot">Running Linux with the new U-Boot</h2>
<p>To boot Linux in non-secure
mode, build the kernel with the Power-State Coordination Interface
(PSCI) enabled (<code class="language-plaintext highlighter-rouge">CONFIG_ARM_PSCI=y</code>, in Kernel Features menu)and
CPU-Idle PM support disabled (<code class="language-plaintext highlighter-rouge">CONFIG_CPU_IDLE is not set</code> in CPU Power
Management-&gt;CPU Idle). Without these changes the kernel will hang.</p>

    </div>
  </div>
</div>

    </main>
    


<footer class="site-footer">

  <h2 class="footer-heading">seL4 docs</h2>

  <div class="footer-col-wrapper">

    <div class="col-md-2">
      



<ul class="social-media-list">
  <li><a href="https://github.com/sel4"><i class="fab fa-github"></i> <span class="username">sel4</span></a></li><li><a href="https://github.com/sel4proj"><i class="fab fa-github"></i> <span class="username">sel4proj</span></a></li>
</ul>

    </div>

    <div class="col-md-8">
      <ul class="list-unstyled">
        <li>
          This site is for displaying seL4 related documentation.  Pull requests are welcome.
        </li>
        
          <li>
            Site last updated: Fri Feb 7 10:17:38 2025 +1100 ee78c8857c
          </li>
          <li>
                Page last updated: Tue Jan 14 15:56:06 2025 +1100 f28f1dfa66
          </li>
        
      </ul>
    </div>
    <div class="col-md-2">
<a href="https://github.com/seL4/docs/blob/master/Hardware/jetsontk1.md">View page on GitHub</a>
      <br />
      <a href="https://github.com/seL4/docs/edit/master/Hardware/jetsontk1.md">Edit page on GitHub</a>
      <br />
      <a href="/sitemap">Sitemap</a>
    </div>

  </div>

</footer>

  </body>
</html>
